# docker pull influxdb:1.8

# influx
# show users
# create user "root" with password 'BICI123456' with all privileges

docker run -d -p 8086:8086 --name influx18 \
      -v influxdb:/var/lib/influxdb \
      --restart=always \
      influxdb:1.8

# 执行完之后
docker exec -it influx18 /bin/bash

#sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
#sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list


cat <<EOF>/etc/apt/sources.list
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
EOF


apt-get clean
apt-get update

apt-get install vim

vim /etc/influxdb/influxdb.conf

#
#[http]
#  auth-enabled = true
#


# influx -username 'root' -password 'BICI123456'
#
